<!DOCTYPE html>
<html>
<head>
    <title>RegExp toString() Example</title>
    <script type="text/javascript">
      
        var pattern = new RegExp("\\[bc\\]at", "gi");
        alert(pattern.toString());    // /\[bc\]at/gi
        alert(pattern.toLocaleString());    // /\[bc\]at/gi

    </script>
</head>
<body>

</body>
</html>